package treqs.model;

// Generated 2009-aug-16 19:26:12 by Hibernate Tools 3.2.4.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Requirement generated by hbm2java
 */
@Entity
@Table(name = "requirement", catalog = "treqs")
public class Requirement implements java.io.Serializable {

	private Integer id;
	private Requirementpriority requirementpriority;
	private Requirementstatus requirementstatus;
	private String uid;
	private String name;
	private String description;
	private String rationale;
	private String comment;
	private int revision;
	private Date creationDate;
	private Date deletionDate;
	private Date editDate;
	private byte[] editLog;
	private String anewFiled;
	private Set<Tasktorequirement> tasktorequirements = new HashSet<Tasktorequirement>(
			0);

	public Requirement() {
	}

	public Requirement(Requirementpriority requirementpriority,
			Requirementstatus requirementstatus, String uid, String name,
			int revision, Date creationDate, String anewFiled) {
		this.requirementpriority = requirementpriority;
		this.requirementstatus = requirementstatus;
		this.uid = uid;
		this.name = name;
		this.revision = revision;
		this.creationDate = creationDate;
		this.anewFiled = anewFiled;
	}

	public Requirement(Requirementpriority requirementpriority,
			Requirementstatus requirementstatus, String uid, String name,
			String description, String rationale, String comment, int revision,
			Date creationDate, Date deletionDate, Date editDate,
			byte[] editLog, String anewFiled,
			Set<Tasktorequirement> tasktorequirements) {
		this.requirementpriority = requirementpriority;
		this.requirementstatus = requirementstatus;
		this.uid = uid;
		this.name = name;
		this.description = description;
		this.rationale = rationale;
		this.comment = comment;
		this.revision = revision;
		this.creationDate = creationDate;
		this.deletionDate = deletionDate;
		this.editDate = editDate;
		this.editLog = editLog;
		this.anewFiled = anewFiled;
		this.tasktorequirements = tasktorequirements;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "priorityID", nullable = false)
	public Requirementpriority getRequirementpriority() {
		return this.requirementpriority;
	}

	public void setRequirementpriority(Requirementpriority requirementpriority) {
		this.requirementpriority = requirementpriority;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "statusID", nullable = false)
	public Requirementstatus getRequirementstatus() {
		return this.requirementstatus;
	}

	public void setRequirementstatus(Requirementstatus requirementstatus) {
		this.requirementstatus = requirementstatus;
	}

	@Column(name = "UID", nullable = false, length = 45)
	public String getUid() {
		return this.uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	@Column(name = "name", nullable = false, length = 65535)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "description", length = 65535)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "rationale", length = 65535)
	public String getRationale() {
		return this.rationale;
	}

	public void setRationale(String rationale) {
		this.rationale = rationale;
	}

	@Column(name = "comment", length = 65535)
	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	@Column(name = "revision", nullable = false)
	public int getRevision() {
		return this.revision;
	}

	public void setRevision(int revision) {
		this.revision = revision;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "creationDate", nullable = false, length = 19)
	public Date getCreationDate() {
		return this.creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "deletionDate", length = 19)
	public Date getDeletionDate() {
		return this.deletionDate;
	}

	public void setDeletionDate(Date deletionDate) {
		this.deletionDate = deletionDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "editDate", length = 19)
	public Date getEditDate() {
		return this.editDate;
	}

	public void setEditDate(Date editDate) {
		this.editDate = editDate;
	}

	@Column(name = "editLog")
	public byte[] getEditLog() {
		return this.editLog;
	}

	public void setEditLog(byte[] editLog) {
		this.editLog = editLog;
	}

	@Column(name = "aNewFiled", nullable = false, length = 45)
	public String getAnewFiled() {
		return this.anewFiled;
	}

	public void setAnewFiled(String anewFiled) {
		this.anewFiled = anewFiled;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "requirement")
	public Set<Tasktorequirement> getTasktorequirements() {
		return this.tasktorequirements;
	}

	public void setTasktorequirements(Set<Tasktorequirement> tasktorequirements) {
		this.tasktorequirements = tasktorequirements;
	}

}
